<?php
/**
 * 数据库配置
 * Created by PhpStorm.
 * User: Keter
 * Date: 2016/8/3
 * Time: 16:40
 */
class DatabaseConfig
{
    const Redis_Token   = 1; //Token库
    const Redis_Log     = 2; //程序日志库
    const Redis_Status  = 3; //用户状态库
    const Redis_Agent   = 4; //PHP基本库
    const Redis_Paiju   = 5; //牌局日志库
    const Redis_User    = 6; //用户信息库
    const Redis_Visit   = 7; //回访日志库
    const Redis_Room_Status = 8; //房间状态库
    const Redis_User_Stats = 9; //用户统计库

    /*mysql连接*/
    public static $mysql_config = array(
        'default' => array(
            'host' => '192.168.40.14',
            'port' => 3306,
            'user' => 'root',
            'password' => 'dj2017',
            'dbName' => 'esmj_fenxi',
        ),

       'game' => array(
            'host' => '192.168.40.14',
            'port' => 3306,
            'user' => 'root',
            'password' => 'dj2017',
            'dbName' => 'esmj',
        ),
        /* 'logs' => array(
            'host' => 'rm-bp1ov42vwi97181obo.mysql.rds.aliyuncs.com',
            'port' => 3306,
            'user' => 'renren6',
            'password' => 'Dianjia2016',
            'dbName' => 'esmj_logs',
        ), */
       'logs' => array(
            'host' => '192.168.1.106',
            'port' => 3306,
            'user' => 'root',
            'password' => 'dj2017',
            'dbName' => 'esmj_logs',
        ),
        'daq' => array(
            'host' => '192.168.40.14',
            'port' => 3306,
            'user' => 'root',
            'password' => 'dj2017',
            'dbName' => 'daq',
        ),
       // 20170704
       'tuiguang' => array(
            'host' => '192.168.1.200',
            'port' => 3306,
            'user' => 'yuwenxi',
            'password' => 'yuwenxi',
            'dbName' => 'test_es',
        ),
        'esmj_config' => array(//mysql://root:dj2015@192.168.1.252:3307/es#utf8
            'host' => '192.168.1.200',
            'port' => 3306,
            'user' => 'yuwenxi',
            'password' => 'yuwenxi',
            'dbName' => 'esmj_config',
        ),
    );

    /**
     * Reids分实例分库
     */
    public static $redis_config = array(
        //PHP基本库（Agent），默认
        'default'    => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_Agent
        ),
        //Token库
        'token'    => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_Token
        ),
        //程序日志库
        'server_log' => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_Log
        ),
        //用户状态库
        'status' => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_Status
        ),
        //牌局日志库
        'paiju_log'  => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_Paiju
        ),
        //用户信息库
        'user_info' => array(
            'host' => '192.168.1.250',
            'port' => 6379,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_User
        ),
        //回访日志库
        'visit_log'  => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_Visit
        ),
        //房间状态库
        'room_status'  => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_Room_Status
        ),
        //用户统计库
        'user_stats'  => array(
            'host' => '192.168.1.252',
            'port' => 6381,
            'password' => '',
            'dbName'   => DatabaseConfig::Redis_User_Stats
        ),
    );
}
